define(['../app'], function(app) {
    // console.log(app);
    app.config(function(
        $stateProvider,
        $urlRouterProvider,
        $locationProvider,
        $httpProvider) {
        $urlRouterProvider.otherwise("/index");
        var PATH_LAYOUT = './views/common/layout.html';
        var PATH_MENU = './views/common/menu.html';
        $stateProvider
            .state('index', {
                url: '/index',
                views: {
                    'layout': {
                        templateUrl: PATH_LAYOUT
                    },
                    'side@index': {
                        templateUrl: PATH_MENU
                    },
                    'main@index': {
                        templateUrl: './views/homepage/index.html',
                        controller: 'homepageCtrl'
                    }
                }
            })
            .state('base', {
                url: '/base',
                views: {
                    'layout': {
                        templateUrl: PATH_LAYOUT
                    },
                    'side@base': {
                        templateUrl: PATH_MENU
                    },
                    'main@base': {
                        templateUrl: './html/Base/center all.html'
                    }
                }
            })
            .state('base.center_all', { url: '/center_all', views: { 'main@base': { templateUrl: './html/Base/center all.html' } } })
            .state('base.horizontally', { url: '/horizontally', views: { 'main@base': { templateUrl: './html/Base/center horizontally.html' } } })

            .state('promote', {
                url: '/promote',
                views: {
                    'layout': {
                        templateUrl: PATH_LAYOUT
                    },
                    'side@promote': {
                        templateUrl: PATH_MENU
                    },
                    'main@promote': {
                        templateUrl: './html/Promote/clearfix.html'
                    }
                }
            })

            .state('promote.clearfix', { url: '/clearfix', views: { 'main@promote': { templateUrl: './html/Promote/clearfix.html' } } })
            .state('promote.flex', { url: '/flex', views: { 'main@promote': { templateUrl: './html/Promote/flex.html' } } })
    })
})